//+build wireinject

package handler

import (
	"github.com/google/wire"
	"gorm.io/gorm"

	"bbs/pkg/domain"
	"bbs/pkg/model/captcha"
	"bbs/pkg/model/email"
	"bbs/pkg/model/redis"
	temp "bbs/pkg/model/template"
	"bbs/pkg/repository"
	"bbs/pkg/service"
)

var captchaSet = wire.NewSet(email.NewEmailService, redis.NewRedisClient, temp.NewTemplateService, captcha.NewCaptchaService)

func initializeUserHandler(db *gorm.DB) domain.UserHandler {
	wire.Build(NewUserHandler, service.NewUserService, captchaSet, repository.NewUserRepository)
	return nil
}
